How to calculate the Energy of photons